package com.learning.cloud.feign;

import com.learning.cloud.entity.User;
import com.learning.config.TestConfiguration;
import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

/**
 * description:
 *
 * @author minghuiZhang
 * @date created in  17:55 2018/5/2
 * modified by
 */
@FeignClient(value = "microservice-provider-user",configuration = TestConfiguration.class,fallback = HystrixClientFallback.class)
public interface UserFeignClient {
	@RequestLine("GET /simple/{id}")
	User findById(@Param("id") Long id);
	@RequestLine("POST /user")
	ResponseEntity<User> findByIdPost(@RequestBody User user);



}
